package com.blues.framework.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.apache.log4j.Logger;

import java.util.List;
import java.util.Map;
import com.blues.framework.db.DbHelper;


@Controller
public class ShipmentController {
	private static Logger logger = Logger.getLogger(ShipmentController.class);
    
	@RequestMapping("/truck/list")
	public ModelAndView truckList() {
		logger.debug(">>>truckList()");
		DbHelper dbHelper = new DbHelper();
		List result = null;
		try {
			result = dbHelper.runSQLQuery("select * from ey_truck");
		} catch (Exception e) {
			logger.error(e, e);
		}
		
		logger.debug("<<<truckList()");
		return new ModelAndView("truck/list", "dataList", result);
	}
}
